/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package net.wofly.sale.order.repository;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import net.wofly.sale.order.domain.OrderContent;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface SaleOrderContentRepository
		extends PagingAndSortingRepository<OrderContent, String>, JpaSpecificationExecutor<OrderContent> {

	@Query(value="select o from net.wofly.sale.order.domain.OrderContent o where o.orderID in :orderIDList")
	List<net.wofly.sale.order.domain.OrderContent> findByOrderIDIn(@Param("orderIDList") List<String> orderIDList);
	
	void deleteByOrderID(String orderID);
}